<?php

//$username = $_POST['username'];

$conn = new PDO('mysql:host=localhost:3307;dbname=php','root','root');
$conn->exec('SET NAMES UTF8');
$conn->beginTransaction();

$res = $conn->prepare("insert into user(username) values(?)");
$res->bindValue(1, "shindayaonline");
$res->execute();

//$rows = $res->fetchAll(PDO::FETCH_OBJ);
echo $conn->lastInsertId();
$conn->commit();

//echo count($rows);


echo $res->rowCount();

